<?php
require('config.php');
$vsID = $_POST['vsid'];
$class_t = $_POST['class_t'];
//$vsID=5;
$count=array();
$name =array();
$select_query = "select title,vcount from vote_item where vsID=$vsID and class='$class_t' order by vcount asc";
$result_select = mysql_query($select_query) or die(mysql_error());
while($row=mysql_fetch_row($result_select)){
    array_push($count,$row[1]);
    array_push($name,$row[0]);
}
$arr['count']=$count;
$arr['name']=$name;
echo json_encode($arr);
?>
